package com.dkm.biz.gl.persistence.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dkm.base.db.mybatis.dao.MyBatisQueryDaoImpl;
import com.dkm.biz.gl.persistence.dao.EavAttributeQueryDao;
import com.dkm.biz.gl.persistence.entity.EavAttributePo;

/**
 * 对象功能:属性 QueryDao接口的实现
 * 开发公司:SKG.COM
 * 开发人员:Yuki
 * 创建时间:2014-12-11 10:47:53
 */
@Repository
public class EavAttributeQueryDaoImpl extends MyBatisQueryDaoImpl<String, EavAttributePo> implements EavAttributeQueryDao{

    @Override
    public String getNamespace() {
        return EavAttributePo.class.getName();
    }

	public Integer countByName(String attrName) {
		String statement = getNamespace() + ".countByName";
		Map<String,Object> params = new HashMap<String, Object>();
		params.put("attr_name_", attrName);
		Object object = sqlSessionTemplate.selectOne(statement,params);
		return (Integer)object;
	}
	
}
